package com.example.authclient.feign;

import com.example.util.model.PrivilegeUser;
import com.example.util.model.Role;
import com.example.util.model.SecurityLogin;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;


import java.util.List;

@FeignClient("authfeign") //注解该feign 访问的是哪个服务  authfeign 访问的服务名
//@Service("privilegeClient")
public interface IndexClient {




	@GetMapping(value = "/authfeign/api/v1/privilegeUser/{loginName}")
	 PrivilegeUser privilegeUser(@PathVariable(value = "loginName")  String loginName);
	
	@GetMapping(value="/authfeign/api/v1/userInfoByLoginName/{loginName}")
	 SecurityLogin userInfoByLoginName(@PathVariable(value = "loginName")  String loginName);
	
	@GetMapping(value="/authfeign/api/v1/userRoles/{id}")
	 List<Role> userRoles(@PathVariable(value = "id")  Long id);


}
